package service.impl;

import java.util.List;

import dao.AreaDao;
import dao.impl.AreaDaoImpl;
import pojo.Area;
import service.AreaService;

public enum AreaServiceFactory implements AreaService {
	INSTANCE;
	
	private AreaDao areaDao = new AreaDaoImpl();

	@Override
	public int addArea(Area a) {
		return areaDao.add(a);
	}

	@Override
	public List<Area> findAreasByKeyword(String keyword) {
		return areaDao.findByKeyword(keyword);
	}

	@Override
	public int updateArea(Area a) {
		return areaDao.update(a);
	}

	@Override
	public int deleteArea(String id) {
		return areaDao.delete(id);
	}

}
